<?php

namespace app\model;

class TopicTopModel extends BaseModel
{
    protected $table = 'topic_top';
    
    protected $casts = [
        'created_at' => 'datetime',
        'updated_at' => 'datetime'
    ];
    
    public function topic()
    {
        return $this->belongsTo(TopicModel::class, 'topic_id');
    }
    
    public function post()
    {
        return $this->belongsTo(PostModel::class, 'post_id');
    }
}